package com.quwan.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author quan
 * @date 2021-08-03 14:18
 */


@Data
@Accessors(chain = true)
@TableName(value = "t_product_category")
public class TProductCategory implements Serializable {
    private static final long serialVersionUID = -2021482190089250058L;
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 标题/类型
     */
    @ApiModelProperty("标题/名称")
    @TableField(value = "caption")
    private String caption;

    /**
     * 类型 1生活服务 2休闲娱乐 3职业技能
     */
    @ApiModelProperty("类型 1生活服务 2休闲娱乐 3职业技能")
    @TableField(value = "cate_type")
    private Integer cateType;

    /**
     * 排序
     */
    @ApiModelProperty("排序")
    @TableField(value = "order_num")
    private Integer orderNum;

    /**
     * 状态
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 是否首页展示 1展示
     */
    @ApiModelProperty("是否首页展示")
    @TableField(value = "show_index")
    private Integer showIndex;

    /**
     * 图标
     */
    @TableField(value = "icon")
    private String icon;

    @TableField(value = "bg_img")
    private String bgImg;

    /**
     * 0一级类目
     */
    @ApiModelProperty("是否一级类目 0一级")
    @TableField(value = "owner")
    private Long owner;

    /**
     * 颜色
     */
    @TableField(value = "show_color")
    private String showColor;

    @TableField(value = "add_by")
    private String addBy;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    @TableField(value = "add_time")
    private Date addTime;

    @TableField(value = "update_by")
    private String updateBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    @TableField(value = "update_time")
    private Date updateTime;

    @TableField(exist = false)
    private String parentName;
    @TableField(exist = false)
    private String parentId;
    @ApiModelProperty("备注")
    @TableField(value = "remarks")
    private String remarks;

    @ApiModelProperty("二级分类")
    @TableField(exist = false)
    private List<TProductCategory> child;
}